const path = require('path')
const resolve = dir => path.join(__dirname, dir)
// const BASE_URL = process.env.Node_ENV === 'procution' ? '/' : '/'
module.exports = {
  lintOnSave: true,
  publicPath: '/',
  outputDir: 'hotel',
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src'))
  },
  productionSourceMap: false,
  devServer: {
    host:'0.0.0.0',
    port: 9527,
    proxy:{      // proServer.proxy
      '/api':{              //将路径/api代理到 target上
        target: 'http://118.31.62.187',
        changeOrigin: true, //将主机头的来源更改为目标URL
        pathRewrite:{  // 设置路径的转发规则为空
          '/api': ''
        }
      }
    }
  }
  
}
